import request from '@/utils/request'

// 查询建筑物列表
export function getBuildingPage(params) {
  return request({
    url: '/thing/building/page',
    method: 'GET',
	params
  })
}

// 查询建筑物详情
export function getBuilding(id) {
  return request({
    url: `/thing/building/get?id=${id}`,
    method: 'GET'
  })
}

// 新增建筑物
export function createBuilding(data) {
  return request({
    url: '/thing/building/create',
    method: 'POST',
    data: data
  })
}

// 修改建筑物
export function updateBuilding(data) {
  return request({
    url: '/thing/building/update',
    method: 'PUT',
    data: data
  })
}

// 删除建筑物
export function deleteBuilding(id) {
  return request({
    url: `/thing/building/delete?id=${id}`,
    method: 'DELETE'
  })
}

